// 2022/6/9

const promise = new Promise((resolve) => {
  for (let i = 0; i < 100; i++) {
    if (i === 10) {
      // resolve(i);
      return i;
    }
    console.log(i);
  }
});

promise.then(value => console.log(`Result: ${value}`));
